package hku.cs.lunuo.page;

import hku.cs.lunuo.LunuoPlugin;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class AlgorithmPrefPage extends FieldEditorPreferencePage implements
		IWorkbenchPreferencePage {

	public AlgorithmPrefPage() {
		super(GRID);
		setDescription("Choose your favoriate Rank Algorithm");
		setPreferenceStore(LunuoPlugin.getDefault().getPreferenceStore());
	}

	@Override
	protected void createFieldEditors() {
		Composite parent = getFieldEditorParent();
		
		RadioGroupFieldEditor radioField =
			new RadioGroupFieldEditor(PreferenceConstant.ALG_KEY,
					"Rank Algorithm List",
					1,
					PreferenceConstant.ALG_LIST,
					parent,
					true
			);
		addField(radioField);

	}

	@Override
	public void init(IWorkbench workbench) {
		// TODO Auto-generated method stub

	}

}
